package com.sie.controller;

import com.sie.pojo.RoleManager;
import com.sie.service.RoleManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RoleManagerController {

    @Autowired
    private RoleManagerService roleManagerService;

    @RequestMapping("/findAllRole")
    public List<RoleManager> findAll(){
        return roleManagerService.findAll();
    }

    @RequestMapping("/insertRole")
    public Integer insertRole(RoleManager role){
        System.out.println(role);
        return roleManagerService.insertRole(role);
    }
}
